home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / badlands.c < prev    next >
C/C++ Source or Header  |  2000-05-18  |  17KB  |  622 lines

  1. /***************************************************************************
  2.  
  3.     Atari Bad Lands hardware
  4.  
  5.     driver by Aaron Giles
  6.  
  7.     Games supported:
  8.         * Bad Lands (1989)
  9.  
  10.     Known bugs:
  11.         * none at this time
  12.  
  13. ****************************************************************************
  14.  
  15.     Memory map
  16.  
  17. ****************************************************************************
  18.  
  19.     ========================================================================
  20.     MAIN CPU
  21.     ========================================================================
  22.     000000-03FFFF   R     xxxxxxxx xxxxxxxx   Program ROM
  23.     FC0000          R     -------x --------   Sound command buffer full
  24.     FC0000            W   -------- --------   Sound CPU reset
  25.     FD0000-FD1FFF   R/W   -------- xxxxxxxx   EEPROM
  26.     FE0000            W   -------- --------   Watchdog reset
  27.     FE2000            W   -------- --------   VBLANK IRQ acknowledge
  28.     FE4000          R     -------- xxxx----   Switch inputs
  29.                     R     -------- x-------      (Self test)
  30.                     R     -------- -x------      (VBLANK)
  31.                     R     -------- --x-----      (Player 2 button)
  32.                     R     -------- ---x----      (Player 1 button)
  33.     FE6000          R     -------- xxxxxxxx   Player 1 steering
  34.     FE6002          R     -------- xxxxxxxx   Player 2 steering
  35.     FE6004          R     -------- xxxxxxxx   Player 1 pedal
  36.     FE6006          R     -------- xxxxxxxx   Player 2 pedal
  37.     FE8000            W   xxxxxxxx --------   Sound command write
  38.     FEA000          R     xxxxxxxx --------   Sound response read
  39.     FEC000            W   -------- -------x   Playfield tile bank select
  40.     FEE000            W   -------- --------   EEPROM enable
  41.     FFC000-FFC0FF   R/W   xxxxxxxx xxxxxxxx   Playfield palette RAM (128 entries)
  42.                     R/W   x------- --------      (RGB 1 LSB)
  43.                     R/W   -xxxxx-- --------      (Red 5 MSB)
  44.                     R/W   ------xx xxx-----      (Green 5 MSB)
  45.                     R/W   -------- ---xxxxx      (Blue 5 MSB)
  46.     FFC100-FFC1FF   R/W   xxxxxxxx xxxxxxxx   Motion object palette RAM (128 entries)
  47.     FFC200-FFC3FF   R/W   xxxxxxxx xxxxxxxx   Extra palette RAM (256 entries)
  48.     FFE000-FFEFFF   R/W   xxxxxxxx xxxxxxxx   Playfield RAM (64x32 tiles)
  49.                     R/W   xxx----- --------      (Palette select)
  50.                     R/W   ---x---- --------      (Tile bank select)
  51.                     R/W   ----xxxx xxxxxxxx      (Tile index)
  52.     FFF000-FFFFFF   R/W   xxxxxxxx xxxxxxxx   Motion object RAM (32 entries x 4 words)
  53.                     R/W   ----xxxx xxxxxxxx      (0: Tile index)
  54.                     R/W   xxxxxxxx x-------      (1: Y position)
  55.                     R/W   -------- ----xxxx      (1: Number of Y tiles - 1)
  56.                     R/W   xxxxxxxx x-------      (3: X position)
  57.                     R/W   -------- ----x---      (3: Priority)
  58.                     R/W   -------- -----xxx      (3: Palette select)
  59.     ========================================================================
  60.     Interrupts:
  61.         IRQ1 = VBLANK
  62.         IRQ2 = sound CPU communications
  63.     ========================================================================
  64.  
  65.  
  66.     ========================================================================
  67.     SOUND CPU (based on JSA II, but implemented onboard)
  68.     ========================================================================
  69.     0000-1FFF   R/W   xxxxxxxx   Program RAM
  70.     2000-2001   R/W   xxxxxxxx   YM2151 communications
  71.     2802        R     xxxxxxxx   Sound command read
  72.     2804        R     xxxx--xx   Status input
  73.                 R     x-------      (Self test)
  74.                 R     -x------      (Sound command buffer full)
  75.                 R     --x-----      (Sound response buffer full)
  76.                 R     ---x----      (Self test)
  77.                 R     ------xx      (Coin inputs)
  78.     2806        R/W   --------   IRQ acknowledge
  79.     2A02          W   xxxxxxxx   Sound response write
  80.     2A04          W   xxxx---x   Sound control
  81.                   W   xx------      (ROM bank select)
  82.                   W   --xx----      (Coin counters)
  83.                   W   -------x      (YM2151 reset)
  84.     3000-3FFF   R     xxxxxxxx   Banked ROM
  85.     4000-FFFF   R     xxxxxxxx   Program ROM
  86.     ========================================================================
  87.     Interrupts:
  88.         IRQ = timed interrupt ORed with YM2151 interrupt
  89.         NMI = latch on sound command
  90.     ========================================================================
  91.  
  92. ****************************************************************************/
  93.  
  94.  
  95. #include "driver.h"
  96. #include "machine/atarigen.h"
  97. #include "vidhrdw/generic.h"
  98.  
  99.  
  100. WRITE_HANDLER( badlands_playfieldram_w );
  101. WRITE_HANDLER( badlands_pf_bank_w );
  102.  
  103. int badlands_vh_start(void);
  104. void badlands_vh_stop(void);
  105. void badlands_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  106.  
  107. void badlands_scanline_update(int scanline);
  108.  
  109.  
  110. static UINT8 pedal_value[2];
  111.  
  112. static UINT8 *bank_base;
  113. static UINT8 *bank_source_data;
  114.  
  115.  
  116.  
  117. /*************************************
  118.  *
  119.  *    Initialization
  120.  *
  121.  *************************************/
  122.  
  123. static void update_interrupts(void)
  124. {
  125.     int newstate = 0;
  126.  
  127.     if (atarigen_video_int_state)
  128.         newstate = 1;
  129.     if (atarigen_sound_int_state)
  130.         newstate = 2;
  131.  
  132.     if (newstate)
  133.         cpu_set_irq_line(0, newstate, ASSERT_LINE);
  134.     else
  135.         cpu_set_irq_line(0, 7, CLEAR_LINE);
  136. }
  137.  
  138.  
  139. static void scanline_update(int scanline)
  140. {
  141.     badlands_scanline_update(scanline);
  142.  
  143.     /* sound IRQ is on 32V */
  144.     if (scanline % 32 == 0)
  145.     {
  146.         if (scanline & 32)
  147.             atarigen_6502_irq_ack_r(0);
  148.         else if (!(readinputport(0) & 0x40))
  149.             atarigen_6502_irq_gen();
  150.     }
  151. }
  152.  
  153.  
  154. static void init_machine(void)
  155. {
  156.     pedal_value[0] = pedal_value[1] = 0x80;
  157.  
  158.     atarigen_eeprom_reset();
  159.     atarigen_interrupt_reset(update_interrupts);
  160.     atarigen_scanline_timer_reset(scanline_update, 8);
  161.  
  162.     atarigen_sound_io_reset(1);
  163.     memcpy(bank_base, &bank_source_data[0x0000], 0x1000);
  164. }
  165.  
  166.  
  167.  
  168. /*************************************
  169.  *
  170.  *    Interrupt handling
  171.  *
  172.  *************************************/
  173.  
  174. static int vblank_int(void)
  175. {
  176.     int pedal_state = input_port_4_r(0);
  177.     int i;
  178.  
  179.     /* update the pedals once per frame */
  180.     for (i = 0; i < 2; i++)
  181.     {
  182.         pedal_value[i]--;
  183.         if (pedal_state & (1 << i))
  184.             pedal_value[i]++;
  185.     }
  186.  
  187.     return atarigen_video_int_gen();
  188. }
  189.  
  190.  
  191.  
  192. /*************************************
  193.  *
  194.  *    I/O read dispatch
  195.  *
  196.  *************************************/
  197.  
  198. static READ_HANDLER( sound_busy_r )
  199. {
  200.     int temp = 0xfeff;
  201.  
  202.     (void)offset;
  203.     if (atarigen_cpu_to_sound_ready) temp ^= 0x0100;
  204.     return temp;
  205. }
  206.  
  207.  
  208. static READ_HANDLER( pedal_0_r )
  209. {
  210.     (void)offset;
  211.     return pedal_value[0];
  212. }
  213.  
  214.  
  215. static READ_HANDLER( pedal_1_r )
  216. {
  217.     (void)offset;
  218.     return pedal_value[1];
  219. }
  220.  
  221.  
  222.  
  223. /*************************************
  224.  *
  225.  *    Audio I/O handlers
  226.  *
  227.  *************************************/
  228.  
  229. static READ_HANDLER( audio_io_r )
  230. {
  231.     int result = 0xff;
  232.  
  233.     switch (offset & 0x206)
  234.     {
  235.         case 0x000:        /* n/c */
  236.             logerror("audio_io_r: Unknown read at %04X\n", offset & 0x206);
  237.             break;
  238.  
  239.         case 0x002:        /* /RDP */
  240.             result = atarigen_6502_sound_r(offset);
  241.             break;
  242.  
  243.         case 0x004:        /* /RDIO */
  244.             /*
  245.                 0x80 = self test
  246.                 0x40 = NMI line state (active low)
  247.                 0x20 = sound output full
  248.                 0x10 = self test
  249.                 0x08 = +5V
  250.                 0x04 = +5V
  251.                 0x02 = coin 2
  252.                 0x01 = coin 1
  253.             */
  254.             result = readinputport(3);
  255.             if (!(readinputport(0) & 0x0080)) result ^= 0x90;
  256.             if (atarigen_cpu_to_sound_ready) result ^= 0x40;
  257.             if (atarigen_sound_to_cpu_ready) result ^= 0x20;
  258.             result ^= 0x10;
  259.             break;
  260.  
  261.         case 0x006:        /* /IRQACK */
  262.             atarigen_6502_irq_ack_r(0);
  263.             break;
  264.  
  265.         case 0x200:        /* /VOICE */
  266.         case 0x202:        /* /WRP */
  267.         case 0x204:        /* /WRIO */
  268.         case 0x206:        /* /MIX */
  269.             logerror("audio_io_r: Unknown read at %04X\n", offset & 0x206);
  270.             break;
  271.     }
  272.  
  273.     return result;
  274. }
  275.  
  276.  
  277. static WRITE_HANDLER( audio_io_w )
  278. {
  279.     switch (offset & 0x206)
  280.     {
  281.         case 0x000:        /* n/c */
  282.         case 0x002:        /* /RDP */
  283.         case 0x004:        /* /RDIO */
  284.             logerror("audio_io_w: Unknown write (%02X) at %04X\n", data & 0xff, offset & 0x206);
  285.             break;
  286.  
  287.         case 0x006:        /* /IRQACK */
  288.             atarigen_6502_irq_ack_r(0);
  289.             break;
  290.  
  291.         case 0x200:        /* n/c */
  292.         case 0x206:        /* n/c */
  293.             break;
  294.  
  295.         case 0x202:        /* /WRP */
  296.             atarigen_6502_sound_w(offset, data);
  297.             break;
  298.  
  299.         case 0x204:        /* WRIO */
  300.             /*
  301.                 0xc0 = bank address
  302.                 0x20 = coin counter 2
  303.                 0x10 = coin counter 1
  304.                 0x08 = n/c
  305.                 0x04 = n/c
  306.                 0x02 = n/c
  307.                 0x01 = YM2151 reset (active low)
  308.             */
  309.  
  310.             /* update the bank */
  311.             memcpy(bank_base, &bank_source_data[0x1000 * ((data >> 6) & 3)], 0x1000);
  312.             break;
  313.     }
  314. }
  315.  
  316.  
  317.  
  318. /*************************************
  319.  *
  320.  *    Main CPU memory handlers
  321.  *
  322.  *************************************/
  323.  
  324. static struct MemoryReadAddress main_readmem[] =
  325. {
  326.     { 0x000000, 0x03ffff, MRA_ROM },
  327.     { 0xfc0000, 0xfc1fff, sound_busy_r },
  328.     { 0xfd0000, 0xfd1fff, atarigen_eeprom_r },
  329.     { 0xfe4000, 0xfe5fff, input_port_0_r },
  330.     { 0xfe6000, 0xfe6001, input_port_1_r },
  331.     { 0xfe6002, 0xfe6003, input_port_2_r },
  332.     { 0xfe6004, 0xfe6005, pedal_0_r },
  333.     { 0xfe6006, 0xfe6007, pedal_1_r },
  334.     { 0xfea000, 0xfebfff, atarigen_sound_upper_r },
  335.     { 0xffc000, 0xffc3ff, paletteram_word_r },
  336.     { 0xffe000, 0xffefff, MRA_BANK1 },
  337.     { 0xfff000, 0xffffff, MRA_BANK2 },
  338.     { -1 }  /* end of table */
  339. };
  340.  
  341.  
  342. static struct MemoryWriteAddress main_writemem[] =
  343. {
  344.     { 0x000000, 0x03ffff, MWA_ROM },
  345.     { 0xfc0000, 0xfc1fff, atarigen_sound_reset_w },
  346.     { 0xfd0000, 0xfd1fff, atarigen_eeprom_w, &atarigen_eeprom, &atarigen_eeprom_size },
  347.     { 0xfe0000, 0xfe1fff, watchdog_reset_w },
  348.     { 0xfe2000, 0xfe3fff, atarigen_video_int_ack_w },
  349.     { 0xfe8000, 0xfe9fff, atarigen_sound_upper_w },
  350.     { 0xfec000, 0xfedfff, badlands_pf_bank_w },
  351.     { 0xfee000, 0xfeffff, atarigen_eeprom_enable_w },
  352.     { 0xffc000, 0xffc3ff, atarigen_expanded_666_paletteram_w, &paletteram },
  353.     { 0xffe000, 0xffefff, badlands_playfieldram_w, &atarigen_playfieldram, &atarigen_playfieldram_size },
  354.     { 0xfff000, 0xffffff, MWA_BANK2, &atarigen_spriteram, &atarigen_spriteram_size },
  355.     { -1 }  /* end of table */
  356. };
  357.  
  358.  
  359.  
  360. /*************************************
  361.  *
  362.  *    Sound CPU memory handlers
  363.  *
  364.  *************************************/
  365.  
  366. static struct MemoryReadAddress audio_readmem[] =
  367. {
  368.     { 0x0000, 0x1fff, MRA_RAM },
  369.     { 0x2000, 0x2001, YM2151_status_port_0_r },
  370.     { 0x2800, 0x2bff, audio_io_r },
  371.     { 0x3000, 0xffff, MRA_ROM },
  372.     { -1 }  /* end of table */
  373. };
  374.  
  375.  
  376. static struct MemoryWriteAddress audio_writemem[] =
  377. {
  378.     { 0x0000, 0x1fff, MWA_RAM },
  379.     { 0x2000, 0x2000, YM2151_register_port_0_w },
  380.     { 0x2001, 0x2001, YM2151_data_port_0_w },
  381.     { 0x2800, 0x2bff, audio_io_w },
  382.     { 0x3000, 0xffff, MWA_ROM },
  383.     { -1 }  /* end of table */
  384. };
  385.  
  386.  
  387. /*************************************
  388.  *
  389.  *    Port definitions
  390.  *
  391.  *************************************/
  392.  
  393. INPUT_PORTS_START( badlands )
  394.     PORT_START        /* fe4000 */
  395.     PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED )
  396.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
  397.     PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 )
  398.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  399.     PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 )
  400.     PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_VBLANK )
  401.     PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
  402.     PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
  403.  
  404.     PORT_START      /* fe6000 */
  405.     PORT_ANALOG( 0x00ff, 0, IPT_DIAL | IPF_PLAYER1, 50, 10, 0, 0 )
  406.     PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
  407.  
  408.     PORT_START      /* fe6002 */
  409.     PORT_ANALOG( 0x00ff, 0, IPT_DIAL | IPF_PLAYER2, 50, 10, 0, 0 )
  410.     PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
  411.  
  412.     PORT_START        /* audio port */
  413.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
  414.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
  415.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )
  416.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
  417.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL )    /* self test */
  418.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL )    /* response buffer full */
  419.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL )    /* command buffer full */
  420.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL )    /* self test */
  421.  
  422.     PORT_START      /* fake for pedals */
  423.     PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER1 )
  424.     PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2 )
  425.     PORT_BIT( 0xfffe, IP_ACTIVE_HIGH, IPT_UNUSED )
  426. INPUT_PORTS_END
  427.  
  428.  
  429.  
  430. /*************************************
  431.  *
  432.  *    Graphics definitions
  433.  *
  434.  *************************************/
  435.  
  436. static struct GfxLayout pflayout =
  437. {
  438.     8,8,
  439.     RGN_FRAC(1,1),
  440.     4,
  441.     { 0, 1, 2, 3 },
  442.     { 0, 4, 8, 12, 16, 20, 24, 28 },
  443.     { 0*8, 4*8, 8*8, 12*8, 16*8, 20*8, 24*8, 28*8 },
  444.     32*8
  445. };
  446.  
  447.  
  448. static struct GfxLayout molayout =
  449. {
  450.     16,8,
  451.     RGN_FRAC(1,1),
  452.     4,
  453.     { 0, 1, 2, 3 },
  454.     { 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 },
  455.     { 0*8, 8*8, 16*8, 24*8, 32*8, 40*8, 48*8, 56*8 },
  456.     64*8
  457. };
  458.  
  459.  
  460. static struct GfxDecodeInfo gfxdecodeinfo[] =
  461. {
  462.     { REGION_GFX1, 0, &pflayout,    0, 8 },
  463.     { REGION_GFX2, 0, &molayout,  128, 8 },
  464.     { -1 } /* end of array */
  465. };
  466.  
  467.  
  468.  
  469. /*************************************
  470.  *
  471.  *    Sound definitions
  472.  *
  473.  *************************************/
  474.  
  475. static struct YM2151interface ym2151_interface =
  476. {
  477.     1,
  478.     ATARI_CLOCK_14MHz/4,
  479.     { YM3012_VOL(30,MIXER_PAN_CENTER,30,MIXER_PAN_CENTER) },
  480.     { 0 }
  481. };
  482.  
  483.  
  484.  
  485. /*************************************
  486.  *
  487.  *    Machine driver
  488.  *
  489.  *************************************/
  490.  
  491. static struct MachineDriver machine_driver_badlands =
  492. {
  493.     /* basic machine hardware */
  494.     {
  495.         {
  496.             CPU_M68000,        /* verified */
  497.             ATARI_CLOCK_14MHz/2,
  498.             main_readmem,main_writemem,0,0,
  499.             vblank_int,1
  500.         },
  501.         {
  502.             CPU_M6502,
  503.             ATARI_CLOCK_14MHz/8,
  504.             audio_readmem,audio_writemem,0,0,
  505.             ignore_interrupt,1
  506.         }
  507.     },
  508.     60, DEFAULT_REAL_60HZ_VBLANK_DURATION,
  509.     1,
  510.     init_machine,
  511.  
  512.     /* video hardware */
  513.     42*8, 30*8, { 0*8, 42*8-1, 0*8, 30*8-1 },
  514.     gfxdecodeinfo,
  515.     256,256,
  516.     0,
  517.  
  518.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_UPDATE_BEFORE_VBLANK |
  519.             VIDEO_SUPPORTS_DIRTY,
  520.     0,
  521.     badlands_vh_start,
  522.     badlands_vh_stop,
  523.     badlands_vh_screenrefresh,
  524.  
  525.     /* sound hardware */
  526.     0,0,0,0,
  527.     {
  528.         {
  529.             SOUND_YM2151,
  530.             &ym2151_interface
  531.         }
  532.     },
  533.  
  534.     atarigen_nvram_handler
  535. };
  536.  
  537.  
  538.  
  539. /*************************************
  540.  *
  541.  *    ROM decoding
  542.  *
  543.  *************************************/
  544.  
  545. static void rom_decode(void)
  546. {
  547.     int i;
  548.  
  549.     for (i = 0; i < memory_region_length(REGION_GFX1); i++)
  550.         memory_region(REGION_GFX1)[i] ^= 0xff;
  551.     for (i = 0; i < memory_region_length(REGION_GFX2); i++)
  552.         memory_region(REGION_GFX2)[i] ^= 0xff;
  553. }
  554.  
  555.  
  556.  
  557. /*************************************
  558.  *
  559.  *    ROM definition(s)
  560.  *
  561.  *************************************/
  562.  
  563. ROM_START( badlands )
  564.     ROM_REGION( 0x40000, REGION_CPU1 )    /* 4*64k for 68000 code */
  565.     ROM_LOAD_EVEN( "1008.20f",  0x00000, 0x10000, 0xa3da5774 )
  566.     ROM_LOAD_ODD ( "1006.27f",  0x00000, 0x10000, 0xaa03b4f3 )
  567.     ROM_LOAD_EVEN( "1009.17f",  0x20000, 0x10000, 0x0e2e807f )
  568.     ROM_LOAD_ODD ( "1007.24f",  0x20000, 0x10000, 0x99a20c2c )
  569.  
  570.     ROM_REGION( 0x14000, REGION_CPU2 )    /* 64k for 6502 code */
  571.     ROM_LOAD( "1018.9c", 0x10000, 0x4000, 0xa05fd146 )
  572.     ROM_CONTINUE(        0x04000, 0xc000 )
  573.  
  574.     ROM_REGION( 0x60000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  575.     ROM_LOAD( "1012.4n",  0x000000, 0x10000, 0x5d124c6c )    /* playfield */
  576.     ROM_LOAD( "1013.2n",  0x010000, 0x10000, 0xb1ec90d6 )
  577.     ROM_LOAD( "1014.4s",  0x020000, 0x10000, 0x248a6845 )
  578.     ROM_LOAD( "1015.2s",  0x030000, 0x10000, 0x792296d8 )
  579.     ROM_LOAD( "1016.4u",  0x040000, 0x10000, 0x878f7c66 )
  580.     ROM_LOAD( "1017.2u",  0x050000, 0x10000, 0xad0071a3 )
  581.  
  582.     ROM_REGION( 0x30000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  583.     ROM_LOAD( "1010.14r", 0x000000, 0x10000, 0xc15f629e )    /* mo */
  584.     ROM_LOAD( "1011.10r", 0x010000, 0x10000, 0xfb0b6717 )
  585.     ROM_LOAD( "1019.14t", 0x020000, 0x10000, 0x0e26bff6 )
  586. ROM_END
  587.  
  588.  
  589.  
  590. /*************************************
  591.  *
  592.  *    Driver initialization
  593.  *
  594.  *************************************/
  595.  
  596. static void init_badlands(void)
  597. {
  598.     atarigen_eeprom_default = NULL;
  599.  
  600.     /* initialize the audio system */
  601.     bank_base = &memory_region(REGION_CPU2)[0x03000];
  602.     bank_source_data = &memory_region(REGION_CPU2)[0x10000];
  603.  
  604.     /* speed up the 6502 */
  605.     atarigen_init_6502_speedup(1, 0x4155, 0x416d);
  606.  
  607.     /* display messages */
  608.     atarigen_show_sound_message();
  609.  
  610.     rom_decode();
  611. }
  612.  
  613.  
  614.  
  615. /*************************************
  616.  *
  617.  *    Game driver(s)
  618.  *
  619.  *************************************/
  620.  
  621. GAME( 1989, badlands, 0, badlands, badlands, badlands, ROT0, "Atari Games", "Bad Lands" )
  622.